<?php
/**
 * Created by PhpStorm.
 * User: hahastein
 * Date: 2018/8/22
 * Time: 0:31
 */

namespace Api\Controller;

use EasyWeChat\Foundation\Application;

class UserController extends BaseController
{
    public function wx(){
        $app = new Application($this->options);
        $wxUserInfo = $app->oauth->user();

        //获取了微信的用户信息
        if(M('dm_user')->where(array(
            'user_id' => $out_trade_no
        ))->save(array(
            'status' => 3,
            'tsn' => $transactionId,
            'payprice' => $total_fee
        ))){
            echo 'SUCCESS';
            die;
        }else{
            echo 'SUCCESS';
            die;
        }
    }
}